public class Homework09 {
    public static void main(String[] args) {
        double start = 1;
        for (double i = 2; i <= 100; i++) {
            if (i % 2 == 0) {
                start -= 1 / i;
            } else {
                start += 1 / i;
            }
        }
        System.out.println("结果为：" + start);
    }
}
